package com.shenmazong.serverwebpoem.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.shenmazong.serverwebpoem.pojo.TbCollection;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;

import java.util.Map;

/**
 * @author 田不平
 * @project server-web-poem
 * @date 2020/3/24 8:27 AM
 * http://www.shenmazong.com
 */

@Mapper
@Component(value = "iTbCollection")
public interface ITbCollectionMapper extends BaseMapper<TbCollection> {

    @Select("select id,userid,poetryid,title,createtime from tb_collection where userid=#{userId} order by id desc")
    IPage<TbCollection> selectMapCollectionByPage(Page<TbCollection> page, @Param("userId") Integer userId);
}
